#include "qcpaxistickermeter.h"

QCPAxisTickerMeter::QCPAxisTickerMeter(int keyPerMeter) {
    mKeyPerMeter = keyPerMeter;
}

QString QCPAxisTickerMeter::getTickLabel(double tick, const QLocale &locale,
                                         QChar formatChar, int precision) {
    Q_UNUSED(precision)
    Q_UNUSED(formatChar)
    QString value = locale.toString(keyToMeter(tick));
    value.append("m");
    return value;
}

double QCPAxisTickerMeter::keyToMeter(double key) { return key / mKeyPerMeter; }

unsigned QCPAxisTickerMeter::getKeyPerMeter() { return mKeyPerMeter; }
